[XEN] Remove sync_pagetable_state(). No longer needed.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 14 Aug 2006 09:58:02 +0000 (10:58 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 14 Aug 2006 09:58:02 +0000 (10:58 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/mm.c
xen/arch/x86/traps.c
xen/common/domain.c
xen/common/grant_table.c
xen/include/asm-ia64/mm.h
xen/include/asm-powerpc/mm.h
xen/include/asm-x86/mm.h

index 35c73a83a5bbdfc7693e76b7b6481acacef46a08..9664a2cda006cf9793b8654e805d1d40453fd134 100644 (file)
@@ -1657,26 +1657,6 @@ int get_page_type(struct page_info *page, unsigned long type)
             {
                 if ( unlikely((x & PGT_type_mask) != (type & PGT_type_mask) ) )
                 {
-                    if ( (current->domain == page_get_owner(page)) &&
-                         ((x & PGT_type_mask) == PGT_writable_page) )
-                    {
-                        /*
-                         * This ensures functions like set_gdt() see up-to-date
-                         * type info without needing to clean up writable p.t.
-                         * state on the fast path. We take this path only
-                         * when the current type is writable because:
-                         *  1. It's the only type that this path can decrement.
-                         *  2. If we take this path more liberally then we can
-                         *     enter a recursive loop via get_page_from_l1e()
-                         *     during pagetable revalidation.
-                         */
-                        sync_pagetable_state(current->domain);
-                        y = page->u.inuse.type_info;
-                        /* Can we make progress now? */
-                        if ( ((y & PGT_type_mask) == (type & PGT_type_mask)) ||
-                             ((y & PGT_count_mask) == 0) )
-                            goto again;
-                    }
                     if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
                          ((type & PGT_type_mask) != PGT_l1_page_table) )
                         MEM_LOG("Bad type (saw %" PRtype_info
@@ -1937,8 +1917,6 @@ int do_mmuext_op(
 
     LOCK_BIGLOCK(d);
 
-    sync_pagetable_state(d);
-
     if ( unlikely(count & MMU_UPDATE_PREEMPTED) )
     {
         count &= ~MMU_UPDATE_PREEMPTED;
@@ -2190,8 +2168,6 @@ int do_mmu_update(
 
     LOCK_BIGLOCK(d);
 
-    sync_pagetable_state(d);
-
     if ( unlikely(shadow_mode_enabled(d)) )
         check_pagetable(v, "pre-mmu"); /* debug */
 
@@ -2701,8 +2677,6 @@ int do_update_va_mapping(unsigned long va, u64 val64,
 
     LOCK_BIGLOCK(d);
 
-    sync_pagetable_state(d);
-
     if ( unlikely(shadow_mode_enabled(d)) )
         check_pagetable(v, "pre-va"); /* debug */
 
@@ -3337,11 +3311,6 @@ int ptwr_do_page_fault(struct domain *d, unsigned long addr,
     return 0;
 }
 
-void sync_pagetable_state(struct domain *d)
-{
-    shadow_sync_all(d);
-}
-
 int map_pages_to_xen(
     unsigned long virt,
     unsigned long mfn,
index 5fd31cf4e63a1821422bd836dcda76a6301340b7..839b5e0c51dfad6b4724de090f0bb8cccb946b0a 100644 (file)
@@ -713,7 +713,6 @@ static int handle_gdt_ldt_mapping_fault(
     {
         /* LDT fault: Copy a mapping from the guest's LDT, if it is valid. */
         LOCK_BIGLOCK(d);
-        sync_pagetable_state(d);
         ret = map_ldt_shadow_page(offset >> PAGE_SHIFT);
         UNLOCK_BIGLOCK(d);
 
@@ -849,7 +848,6 @@ static int spurious_page_fault(
     int            is_spurious;
 
     LOCK_BIGLOCK(d);
-    sync_pagetable_state(d);
     is_spurious = __spurious_page_fault(addr, regs);
     UNLOCK_BIGLOCK(d);
 
@@ -1302,7 +1300,6 @@ static int emulate_privileged_op(struct cpu_user_regs *regs)
 
         case 3: /* Write CR3 */
             LOCK_BIGLOCK(v->domain);
-            sync_pagetable_state(v->domain);
             (void)new_guest_cr3(gmfn_to_mfn(v->domain, xen_cr3_to_pfn(*reg)));
             UNLOCK_BIGLOCK(v->domain);
             break;
index ef95ff5b2e7a1b5b7ae7229a524e21f86d6de66f..284bbee0c4542dbcc6d4d6efb8a5fecb7e42a71c 100644 (file)
@@ -266,8 +266,6 @@ static void domain_shutdown_finalise(void)
         vcpu_sleep_sync(v);
     BUG_ON(!cpus_empty(d->domain_dirty_cpumask));
 
-    sync_pagetable_state(d);
-
     /* Don't set DOMF_shutdown until execution contexts are sync'ed. */
     if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
         send_guest_global_virq(dom0, VIRQ_DOM_EXC);
@@ -406,8 +404,6 @@ void domain_pause(struct domain *d)
 
     for_each_vcpu( d, v )
         vcpu_sleep_sync(v);
-
-    sync_pagetable_state(d);
 }
 
 void domain_unpause(struct domain *d)
@@ -439,8 +435,6 @@ void domain_pause_by_systemcontroller(struct domain *d)
         for_each_vcpu ( d, v )
             vcpu_sleep_sync(v);
     }
-
-    sync_pagetable_state(d);
 }
 
 void domain_unpause_by_systemcontroller(struct domain *d)
index 81f3f9473893ab33738dac23a24807603762e113..5ef06775637437b1f0529667bbb0a56aa294d130 100644 (file)
@@ -942,8 +942,6 @@ do_grant_table_op(
     
     LOCK_BIGLOCK(d);
     
-    sync_pagetable_state(d);
-    
     rc = -EFAULT;
     switch ( cmd )
     {
index bdd688b34d5db2f739d65fb4eb472125258445e8..5bc654802ddd1688403e439cc8d4ba60bb3c81c3 100644 (file)
@@ -500,6 +500,4 @@ extern u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* logps,
 int steal_page(
     struct domain *d, struct page_info *page, unsigned int memflags);
 
-#define sync_pagetable_state(d) ((void)0)
-
 #endif /* __ASM_IA64_MM_H__ */
index 8ad51158dcc7b0c37eece9d3c35fb4b7bf553041..91e757912fad1cc4716821a19a11580406127b80 100644 (file)
@@ -224,6 +224,4 @@ static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn)
 extern int steal_page(struct domain *d, struct page_info *page,
                         unsigned int memflags);
 
-#define sync_pagetable_state(d) ((void)0)
-
 #endif
index b5b9edee0a63e6af5cb1ac6351bf342df7c265fc..dc96970c554d10870954d9698c07150a82041c1d 100644 (file)
@@ -312,8 +312,6 @@ int  ptwr_do_page_fault(struct domain *, unsigned long,
                         struct cpu_user_regs *);
 int  revalidate_l1(struct domain *, l1_pgentry_t *, l1_pgentry_t *);
 
-void sync_pagetable_state(struct domain *d);
-
 int audit_adjust_pgtables(struct domain *d, int dir, int noisy);
 
 #ifndef NDEBUG